<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <#include file=/public.html />
  <link rel="stylesheet" href="/assest/layui-v2.4.5/css/layui.css">
  <title>论坛</title>

</head>
<div style="padding: 20px; background-color: #F2F2F2; height: 800px;">
  <#include file="/head.html" />
  <div style="height:5px;"></div>
  <div style="float:left;width:15%;">
    <table class="" style="width:100%;">
      <#list data=group item=d>
        <tr>
          <td style="padding:4px;">
            <button style="width:100%;" class="layui-btn layui-btn-primary layui-btn-radius">#{d.text}</button>
          </td>
        </tr>
      </#list>
    </table>

  </div>
  <div style="float: right;width:84%;">
    <div style="text-align: right;">

      <button class="layui-btn">评论</button>
    </div>

    <div class="layui-col-md6" style=" margin: 5px;width:99.5%;">
      <div class="layui-card" tyle="width:100%;">
        <div class="layui-card-header" style="height:80px">
          <table style="width:100%;">
            <tr>
              <td>#{data.title}</td>
              <td style="width:250px;">日期:#{data.uptime}<br>作者:#{data.uptime}</td>
            </tr>
          </table>

        </div>
        <div class="layui-card-body">
          #{data.content}
        </div>
      </div>

      <#list data=discuss item=i>

      
          <div class="layui-card" style="width:100%;">
            <div class="layui-card-header">#{i.uptime}</div>
            <div class="layui-card-body">
              #{i.text}
            </div>
          </div>
        </div>

      </#list>
    


  </div>

  <script type="text/javascript" src="/assest/layui-v2.4.5/layui.all.js"></script>
  <script>
    layui.use('table', function () {
      var table = layui.table;

      table.render({
        elem: '#tb_content'
        , url: '/bbs/getcontent'
        , cols: [[
          {
            title: '帖子'
            , templet: function (d) {
              return '<a class="layui-table-link" href="/bbs/content?id=' + d.id + '">' + d.content + '</span>'
            }

          }
          , { field: 'uptime', width: 200, title: '日期' }
        ]]
        , page: true
      });
    });
  </script>

</html>